typedstream StreamTable HashTable Object [20c] typedstream [767c] typedstream HashTable Object HeaderClass %%%%i@@ genericobject_nib executeItem prefsPanel onautoSwitch logoutSwitch openItem openLogin: openLogout: executeLogout: executeLogin: okPrefs: showPrefs: testLogout: FirstResponder firstnib checkSpelling: alignSelCenter: unscript: pasteFont: runPageLayout: superscript: copyRuler: copyFont: selectAll: pasteRuler: toggleRuler: showGuessPanel: alignSelLeft: paste: performClose: arrangeInFront: subscript: copy: alignSelRight: delete: orderFrontColorPanel: underline: performMiniaturize: [10524c] typedstream HashTable Object NibData @@@@s Storage {*@@} [47{*@@}] File's Owner CustomObject Application MainMenu MenuTemplate *@*@ccc Launch Matrix Control Responder @:@iiii MenuCell ButtonCell ActionCell Helvetica Info Panel... Help... Preferences... ff@@#::s submenuAction: Bitmap menuArrow Scripts Execute Login Script Execute Logout Script Open Login Script Open Logout Script Example Login Script Example Logout Script Select All Services MenuItem WindowTemplate iiii***@s@ Panel TextField TextFieldCell Version 1.3, January 1994 by S. Fitzpatrick, Q.U.B. Button NXImage :Copyright 1994, S.Fitzpatrick & QUB. All Rights Reserved. !An application for auto-launching Button1 Field1 Field2 VersionNumber Field Field3$ MainInstance Preferences Execute ~/.Launch and quit NXradio NXradioH Execute ~/.Launch and stay 'Ask whether or not to execute ~/.Launch Set up interface as normal Radio Action on being auto-launched Execute ~/.Logout 'Ask whether or not to execute ~/.Logout Logout as normal Logout action Q2bUQ Panel1 ScrollView ClipView ciifffcfffs [2394c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} \margl40 \margr40 {\colortbl\red0\green0\blue0;} \pard\tx560\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs24 Launch \b0 is an application that allows you to initialize and clean up your workspace when you log in/out: when Launch is auto-launched, it executes the script ~/.Launch; when you logout, Launch executes the script ~/.Logout. \ Actually, you can set Launch's auto-launch/logout behaviour in the preferences panel; I think the options are self-explanatory. Note that if Launch is started from the Workspace (i.e. it isn't auto-launched) it will set up it's interface like any normal application. Also, quitting Launch (using the Quit menu item) does not activate the logout hook.\ Launch can be used to, for example:\ launch applications that you would usually startup when you log in (but that you don't need to have in the dock);\ place an image in the background when you log in;\ play a login/logout sound.\ See the example scripts.\ I'm not really sure if there is a need for Launch now with the various dock-extenders, but it's free so you can't complain. This particular version was inspired by someone asking for a means to set up a user definable logout hook.\ To install Launch:\ place Launch in the dock;\ set it to auto-launch using the Workspace Manager's preference panel;\ create the scripts ~/.Launch and ~/.Logout;\ ensure the scripts are executable and begin with the line\ #!/bin/csh\ (I assume any shell could be used, but I haven't tried that).\ \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 There are menu items to open the scripts in Edit and to execute the scripts (e.g. for testing).\ Launch is free: further distribution is permitted on a non-profit basis. \fc0 All the usual disclaimers apply: this application is provided in good faith and in the hope that it will be useful, but absolutely no guarantee is given as to its suitability or otherwise for any purpose; under no cicumstance will I or the Queen's University of Belfast be held responsible for anything resulting from the use of or the inability to use this application, the source code, or any part thereof.\ Share and Enjoy.\ \qc Stephen Fitzpatrick\ Department of Computer Science\ The Queen's University of Belfast\ sfitzp@cs.qub.ac.uk (NeXT mail) NXCursor NXibeam Scroller _doScroller: @@@ffs ScrollingTextsm Panel2 [1998c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;} \margl40 \margr40 {\colortbl\red0\green0\blue0;} \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\ echo Logging in > /dev/console\ # Play a sound\ sndplay /LocalLibrary/Sounds/login.snd\ # Start some applications\ open /LocalApps/Console\ # 4 performance monitors, one each for CPU, disk, memory and network\ /LocalApps/KPerfMon.app/KPerfMon -InfoType 0 &\ /LocalApps/KPerfMon.app/KPerfMon -InfoType 1 &\ /LocalApps/KPerfMon.app/KPerfMon -InfoType 2 &\ /LocalApps/KPerfMon.app/KPerfMon -InfoType 3 &\ # Check most recent logins before this login\ echo Last 10 logins > /dev/console\ last -10 | sed -e '1,/console/d' | head -5 > /dev/console\ \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \ # Display an image. A more useful variant would select a random image\ # from a list.\ Alert "Background Image?" Yes No\ if ($status == 0) background /LocalLibrary/Backgrounds/Leather.tiff\ \f0 \ Some notes:\ The open command can be used to launch applications. One advantage of using open is that you don't have to specify a full pathname; the Workspace will search its normal applications path for the applicaton.\ If the application is part of a package (i.e. a .app file), then, on a 2.1 system, you should open the executable within the package (e.g. Foo.app/Foo). I don't think this is necessary under 3.0.\ You can't pass arguments to an application using open. You can Launch an application using its pathname and set defaults using the standard NeXT method (see the KPerfMon example).\ The Console and KPerfMon applications and the backgound and Alert commands are NOT supplied with Launch; they should be available from your usual software source. (I believe they're all free.) (And don't ask where you can get Leather.tiff!)\ The sndplay command comes with Motorola NeXTs; I don't know if it comes with Intel NeXTs. Panel3 [624c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;} \margl40 \margr40 {\colortbl\red0\green0\blue0;} \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\ echo Logging out > /dev/console\ # Play a sound\ sndplay /LocalLibrary/Sounds/logout.snd\ # Remove the background image\ set p = (`ps auxww | grep background | grep -v grep | awk '\{print $2\}'`)\ if ("$p" != "") kill -HUP $p\ # This process is left behind by the Console application\ set p = (`ps uxww | grep /usr/ucb/tail | grep -v grep | awk '\{print $2\}'`)\ if ("$p" != "") kill -KILL $p\ {i*@@@} [18{i*@@@}] hide: terminate: delegate makeKeyAndOrderFront: okPrefs:N/ showPrefs: onautoSwitch/< prefsPanel/2 copy: selectAll: logoutSwitch/U executeLogin: executeLogout: openLogin: openLogout: